package cn.kgc.shiroday03.commons;

/**
 * @Author: 课工场
 * @Version: v1.0  2023/6/5
 * @Description:  状态码和提示信息的枚举
 */
public enum CodeMsg {

    SUCCESS(0,"操作成功"),
    ERROR(500,"操作失败"),
    CAPTCHA_OUT_EXPIRE(40001,"验证码失效"),
    CAPTCHA_ERROR(40002,"验证码错误"),
    USER_NOT_EXIST(50001,"用户不存在"),
    USER_EXIST(50002,"用户已存在"),
    USER_LOCKED_ERROR(50004,"账号被锁定,请联系管理员"),
    ROLE_EXIST(50005,"角色已存在"),
    ROLE_HASUSED(50006,"角色被占用"),
    CREDENTIAL_ERROR(50003,"密码错误"),
    NO_AUTHORIZATION(50008,"没有权限，请联系管理员"),
    HAS_SUBMENU(50007,"含有子菜单不能删除"),
    USER_LOGIN_SUCCESS(0,"登录成功");


    private String msg;
    private Integer code;

    private CodeMsg(Integer code,String msg){
        this.code = code;
        this.msg = msg;
    }

    public String getMsg() {
        return msg;
    }

    public Integer getCode() {
        return code;
    }
}
